package com.ruoyi.app.controller.member.mapper;

import com.ruoyi.common.core.dao.BaseMapper;
import com.ruoyi.common.entity.DO.member.MemberCreditRecordDO;
import com.ruoyi.common.entity.DO.member.MemberDO;
import com.ruoyi.common.entity.VO.member.MemberCreditRecordSearchVO;
import com.ruoyi.common.entity.VO.member.MemberCreditRecordVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IMemberCreditRecordMapper extends BaseMapper<MemberCreditRecordDO> {

    List<MemberCreditRecordVO> searchList(MemberCreditRecordSearchVO memberCreditRecordSearchVO);

    @Select("SELECT remark FROM member_credit_record WHERE link_model = #{linkModel} and link_sn = #{linkSn} order by create_time desc LIMIT 1")
    MemberCreditRecordDO getRecordByLinkSn(@Param("linkModel") Integer linkModel, @Param("linkSn") String linkSn);

}
